import { useDispatch } from 'react-redux'
import { getChannels, syncTodo } from './store/actions/todo'

export default function App() {
  const dispatch = useDispatch()
  return (
    <div>
      <h1>异步Action</h1>
      <button onClick={() => dispatch(syncTodo())}>发送获取频道请求</button>
      <button onClick={() => dispatch(getChannels())}>获取频道数据</button>
    </div>
  )
}
